﻿using System;
using System.Linq;
using System.IO;
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Framework.Client;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
namespace LightSwitchApplication
{
    public partial class Application
    {
        partial void CreateNewSalesOrder_CanRun(ref bool result)
        {
            result = this.User.HasPermission(Permissions.CanManageMySalesOrder);
        }

        partial void SalesOrderDetail_CanRun(ref bool result, int? SalesOrderId)
        {
            result = this.User.HasPermission(Permissions.CanManageMySalesOrder);
        }

        partial void SearchSalesOrders_CanRun(ref bool result)
        {
            result = this.User.HasPermission(Permissions.CanManageMySalesOrder);
        }

        partial void SearchShops_CanRun(ref bool result)
        {
            result = this.User.HasPermission(Permissions.CanManageMyShop);
        }

        partial void ShopDetail_CanRun(ref bool result, int ShopId)
        {
            result = this.User.HasPermission(Permissions.CanManageMyShop);
        }
    }
}
